const express = require('express');
const roleController = require('../controller/roleController.js')

const router = express.Router();

router.get('/roles',roleController.getAllRoles)
.get('/roles/tree',roleController.getAllRolesToTree)
.get('/roles/:rid/perm/:pid',roleController.delPermById)
.post('/roles/:rid',roleController.updatePerm)

//导出router 会被加载到app.js入口文件中去
module.exports = router;